<link rel="stylesheet" href="__PUBLIC__/admin/material/css/index.css?v=20221110&times=111" />
<style>
	.main-box-body .navs .active {
    background: azure;
    color: #03a9f4;
    border: 1px solid #03a9f4;
    border-radius: 5px;
}
</style>
<header class="main-box-header clearfix">
    <div class="pull-right">
        <button type="button" class="btn btn-warning"> <input class="checkbox check-all" type="checkbox"
                style="display: inline-block;margin-top: -2px;vertical-align: middle;"> 全选 </button>
        <!-- <button type="button" class="btn btn-warning"> <input class="checkbox check-all" type="checkbox" style="display: inline-block;margin-top: -2px;vertical-align: middle;"> 全选 </button> -->
        <button type="button" class="btn btn-primary" id="createUrl">
            <i class="fa fa-plus"></i> 添加素材 <span class="caret"></span>
        </button>
        <button type="button" class="btn btn-primary" id="uploadTEXT" style="display: none;">
            <i class="fa fa-plus"></i> 添加 <span class="caret"></span>
        </button>
        <button class="btn btn-danger ajax-post confirm" url="{:url('del')}"
            target-form="ids">删 除</button>
    </div>
    {include file="book/_pub_search" /}
</header>
<div class="main-box-body clearfix">
    {:widget('admin/Book/book', $book_id)}
    {:widget('admin/Book/cate', $cate_type)}
	
<div class="baiduTable">
	<div class="tiktok">
		<div class="row toolTip">
			{empty name="list"}
            <center>暂无数据</center>
            {/empty}
			{volist name="list" id="vo"}
			<div id="content_{$vo.id}" style="display: none;">
				{:str_replace("####","<br />",htmlspecialchars_decode($vo['content_zh2']))}</div>
			<div class="col-md-3">
				<div class="panel panel-default">
					{php}
					$bgcolor = "#fbfafa";
					$color = "";
					if($vo['selection_uid'] != 0){
						$bgcolor = "";
						$color = "#ccc";
					}
					{/php}
					<div class="panel-body" style="background: {$bgcolor};padding:10px 40px;">
						<span
							style="color:{$color};">{:str_replace("####","<br />",htmlspecialchars_decode($vo['content_zh2']))}</span>
						<div class="show">展开</div>
						<div class="setting">
							

							<div style="margin-top:10px;" onclick="upload(this, {$vo['id']})" id="upload_id_{$vo['id']}"
								data-json='{:json_encode($vo)}'>
								
							</div>

						</div>
					</div>
					<div class="panel-footer" style="flex-direction: column;">
						<div style="width: 100%;justify-content: space-between;color: #b1b0b0;">
							<div style="display: flex;align-items: center;">
								<input class="ids row-selected" type="checkbox" name="id[]" value="{$vo['id']}"
									style="margin: 0;margin-right:4px">
								<span
									style="white-space: nowrap;text-overflow: ellipsis;overflow: hidden;word-break: break-all;width: 150px;">
									<!-- {$vo.title} -->
									归属: {$userlist[$vo['uid']]??$vo['uid']}
								</span>
							</div>
							<span>创: {$userlist[$vo['create_uid']]??$vo['create_uid']}  {$vo['show_time']} </span>
						</div>
						<div style="justify-content: space-between;width: 100%;">
							<div style="display: flex;align-items: center;">

								<div style="display: flex;align-items: center;" {if $vo['selection_uid'] == 0}onclick="selection({$vo['id']})"{/if}>{if $vo['selection_uid'] == 0}
									<i class="fa fa-edit"></i> 未选用{else/} 
									 {$userlist[$vo['selection_uid']]??$vo['selection_uid']} 在 {:date("m-d H:i:s",$vo['selection_time'])} &nbsp;  <span  style="color:#ff3c00">已选用</span>
									{/if}
								</div>
							</div>

							<div style="font-size: 14px;font-weight: bold;display: flex;">
								<div onclick="copyContent(`{:str_replace('####','<br/>',htmlspecialchars_decode($vo['content_zh2']))}`, {$vo.id})"
									class="douyin_copy " style="color:#000;margin-right:6px">
									复制
								</div>


								<div style="cursor: pointer;margin-right:6px">
								</div>

								<div style="cursor: pointer;margin-right:6px">
									<a style="color:#000" onclick="editreferral(this)"
										data-json='{:json_encode($vo)}'>编辑</a>
								</div>

							</div>
						</div>
					</div>
				</div>
				<div class="mask">
					<i class="iconfont icon-cuowu"></i>
					<!-- <span aria-hidden="true">×</span> -->
					<div class="content" style="min-height: 250px;background: {$bgcolor};color:{$color};">
						{:str_replace("####","<br />",htmlspecialchars_decode($vo['content_zh2']))}
					</div>
				</div>
			</div>
			{/volist}
		</div>
	</div>
	{$page}
</div>
</div>




<div class="modal fade" id="create-referral-link-modal">
	<div class="modal-dialog" role="document">
	   <div class="modal-content">
		   <div class="modal-header">
			   <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button>
			   <span style="font-size: 20px;"><span id="referralname">添加</span></span>
		   </div>
		   <div class="modal-body">
			   <div data-bind="visible: loading" class="loading-panel" style="display: none;">
				   <i class="fa fa-spin fa-spinner"></i>
			   </div>
			   <form class="form-horizontal modelform">
                    
                    <div class="form-group">
                        <label class="control-label col-sm-2">文案</label>
                        <div class="col-lg-8">
                            <textarea class="form-control"  cols="100" rows="20"  name="content" id="content" placeholder=""></textarea>
                        </div>
                    </div>
                    <input type="hidden" name="cate_type" value="{$cate_type}">
                    <input type="hidden" name="book_id"   value="{$book_id}">
                    <input type="hidden" name="id" id="createspreadid">
                    <div class="form-group" id="batchtxt">
                        <label class="control-label col-sm-2">批量上传</label>
                        <div class="col-lg-8">
                            <div class="picker-box">
                                <div id="picker_ebook" class="picker_button">上传文案 </div>
                                <input type="hidden" name="ebook" id="field_ebook" value="">
                                <div id="fileList_ebook" class="upload-file-list-info" >(请上传.txt文件， 以@@分开)</div>
                            </div>
                    
                        </div>
                    </div>

			   </form>
		   </div>
		   <div class="modal-footer">
			   <button type="button" id="createreferral" class="btn btn-primary ">提交</button>
		   </div>
	   </div>
   </div>
</div>